Impact on Businesses

Finding the dip in the market due to Covid-19

Visualizing closing prices of YesBank as an indicator of stock market (Adding more stocks leads to page becoming unresponsive)

Impact around the world

About the Assignment

Get my Project

View and download my data cleaning script here [https://www.kaggle.com/cmdrsam/reducing-stock-market-data] or Get the full code with datasets on my github [https://github.com/CmdrSam/COVID19-Dashboard]

Dataset used in the Assignment

I used Rami Krispin’s [https://www.linkedin.com/in/rami-krispin/] dataset on Covid-19 which updates in realtime. This helps in making the application relavent even when new data arrives.

For Stock Market data I only used data for YesBank as size of whole dataset was 5.2GB. I downloaded the data from kaggle[https://www.kaggle.com/hk7797/stock-market-india]. But the data was still too large so I used python to clean the data and reduce its size.

How I added dataset

The input data for this dashboard is the dataset available from Rami Krispin’s R package, I installed it using the following commands:

install.packages("devtools")
devtools::install_github("RamiKrispin/coronavirus")

How I exported Rmd file to HTML

I installed the packages needed to export Rmd to HTML using FlexDashboard

install.packages(c("knitr", "rmarkdown", "markdown"))

library(knitr)
library(rmarkdown)
library(markdown)

Then I added output format at the top of Rmd file

output: 
  flexdashboard::flex_dashboard:
    orientation: rows
    vertical_layout: fill

Then I used Knit button that appears above the toolbar in coding window.

Optimizing the HTML file The orignal HTML file was of 25MB hence it was very unresponsive and took a lot of time to load. Apart from reducing the data size and formatting, I also used Kamil Slowikowski’s script[https://gist.github.com/slowkow/d0cfa4c21ca7e72f6fed4a1d82112b94] to further optimize the HTML page.

References

  1. Leaflet https://rstudio.github.io/leaflet/
  2. R Markdown Cheatsheet https://rstudio.com/wp-content/uploads/2015/02/rmarkdown-cheatsheet.pdf
  3. Making Dashboard using FlexDashboard https://towardsdatascience.com/building-an-hr-dashboard-in-r-using-flexdashboard-76d14ed3f32
  4. Plotly graphs and charts https://plotly.com/r/